<script lang="ts" setup>
import { ref , reactive , onMounted } from 'vue'
import { useI18n } from 'vue-i18n';
const { locale, t } = useI18n();

const form = reactive({
  username: '',
  avatar: ''
})
const noEdit = ref<Boolean>(true)

onMounted(() => {
  getInfo()
})

const getInfo = () => {
  form.avatar = 'https://thirdwx.qlogo.cn/mmopen/vi_32/rZEIzYRP1Qt6iacLJpuMdAoYfkf9aNJIM8hJsvviaZjdCvGrm6OIXraYniauOxic8miaLnEoZyJ65f7mDibzIcECMc2w/132'
  form.username = 'Arpat'
}

const onSubmit = () => {
  // console.log(form)

}
</script>

<template>
  <el-form :model="form" label-width="120px">
    <el-form-item :label="$t('avatar')" style="margin: 25px 0">
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
      <el-avatar  style="width: 100px;height: 100px;" :src="form.avatar"  :disabled = "noEdit" />
    </el-form-item>
    <el-form-item :label="$t('username')">
      <el-input v-model="form.username" size="large"  :disabled= "noEdit" />
    </el-form-item>
<!--    <el-form-item>-->
<!--      <el-button type="primary" @click="onSubmit">Create</el-button>-->
<!--      <el-button>Cancel</el-button>-->
<!--    </el-form-item>-->
  </el-form>
</template>

<style scoped lang="scss">

</style>